<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/los.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('los_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/los.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="graph_8h_source.html">graph.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="solution_8h_source.html">solution.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="tabooState_8h_source.html">tabooState.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ALGConfiguration_8h_source.html">ALGConfiguration.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for los.h:</div>
<div class="dyncontent">
<div class="center"><img src="los_8h__incl.png" border="0" usemap="#includes_2los_8h" alt=""/></div>
<map name="includes_2los_8h" id="includes_2los_8h">
<area shape="rect" id="node5" href="graph_8h.html" title="graph.h" alt="" coords="80,392,144,421"/><area shape="rect" id="node23" href="solution_8h.html" title="solution.h" alt="" coords="449,83,527,112"/><area shape="rect" id="node53" href="tabooState_8h.html" title="tabooState.h" alt="" coords="571,160,667,189"/><area shape="rect" id="node56" href="ALGConfiguration_8h.html" title="ALGConfiguration.h" alt="" coords="643,315,779,344"/><area shape="rect" id="node12" href="edgeID_8h.html" title="edgeID.h" alt="" coords="352,469,427,499"/><area shape="rect" id="node17" href="edgeGraph_8h.html" title="edgeGraph.h" alt="" coords="232,469,328,499"/><area shape="rect" id="node26" href="vehicleState_8h.html" title="vehicleState.h" alt="" coords="91,237,195,267"/><area shape="rect" id="node36" href="gMatrix_8h.html" title="gMatrix.h" alt="" coords="425,315,500,344"/><area shape="rect" id="node40" href="operations_8h.html" title="operations.h" alt="" coords="357,160,451,189"/><area shape="rect" id="node28" href="vehiclePath_8h.html" title="vehiclePath.h" alt="" coords="43,315,144,344"/><area shape="rect" id="node31" href="edgeSol_8h.html" title="edgeSol.h" alt="" coords="269,392,349,421"/><area shape="rect" id="node47" href="tabooList_8h.html" title="tabooList.h" alt="" coords="576,237,661,267"/><area shape="rect" id="node49" href="tabooExpire_8h.html" title="tabooExpire.h" alt="" coords="576,392,677,421"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="los_8h__dep__incl.png" border="0" usemap="#includes_2los_8hdep" alt=""/></div>
<map name="includes_2los_8hdep" id="includes_2los_8hdep">
<area shape="rect" id="node3" href="add_8h.html" title="includes/add.h" alt="" coords="5,83,112,112"/><area shape="rect" id="node5" href="stm_8h.html" title="includes/stm.h" alt="" coords="136,83,243,112"/><area shape="rect" id="node11" href="remove_8h.html" title="includes/remove.h" alt="" coords="267,83,395,112"/><area shape="rect" id="node13" href="swap_8h.html" title="includes/swap.h" alt="" coords="419,83,533,112"/><area shape="rect" id="node7" href="LTMConfiguration_8h.html" title="includes/LTMConfiguration.h" alt="" coords="96,160,283,189"/><area shape="rect" id="node9" href="ltm_8h.html" title="rappresenta il livello LTM dell&#39;algoritmo UCARPP" alt="" coords="139,237,240,267"/></map>
</div>
</div>
<p><a href="los_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structLOSConfiguration.html">LOSConfiguration</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structEdgePair.html">EdgePair</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a6e00a2fb35dc6707708ee7bb73b30cdd">MOVE_ADD</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">implementa il sottostrato LOS del livello ALG  <a href="#a6e00a2fb35dc6707708ee7bb73b30cdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a942eeb4ae0805d43bebb8806b712c08a">MOVE_SWAP</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#aca2160883183aabb44e9c55536e9c937">MOVE_REMOVE</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#ae6e6bd84c4bacfdd4002cbc97a2527cc">MOVE_STATUS_IMPROVE</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a6d5bd2fe1ebf4b48a88084c50eadfcb0">MOVE_STATUS_WORSEN</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#ac6f1b10d1aeedd6d056feb10c5569c21">MOVE_STATUS_UNCHANGED</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a46f4bf9b16c21de45b4e49ee0988abe3">MOVE_STATUS_FAIL</a>&#160;&#160;&#160;0</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structLOSConfiguration.html">LOSConfiguration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#aed8d3fa4c257841c414f74059768204c">LOSConfiguration</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structLOSConfiguration.html">LOSConfiguration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structEdgePair.html">EdgePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#ab58cd3c6e1a39587e826f01c0ffc9c6a">EdgePair</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structEdgePair.html">EdgePair</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#afb786725c980357f51c0c16ff8414746">PedgePair</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a3ecf8d3eda795e349fb039e8fcf9a03c">BestAddRemoveChoice</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a845149128ecdc5563a7a798c5781dc0c">PbestAddRemoveChoice</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a437a332774430704162eade97987acd0">initLOSConfiguration</a> (<a class="el" href="ALGConfiguration_8h.html#aeba119601bed3ad672c244e7c8522174">PalgConfiguration</a> pALGconfig)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a5d23698e29078da6bf1596b417a1df8c">solveLocalSearch</a> (<a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> p_graph, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> p_solution, int k, <a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a> p_tabooState, int moveType, <a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a> now, <a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a> pLOSconfig)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="los_8h.html#afb786725c980357f51c0c16ff8414746">PedgePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a586fd953db07a1a9eb31761c72a87da0">getEdgeTriangles</a> (<a class="el" href="structEdgeID.html">EdgeID</a> e_ij, int N)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="los_8h.html#a6d96d2b05304fd01bf15c9adaf94f60f">getEdgeTriangulating</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pe_il, <a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pe_jl)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a6e00a2fb35dc6707708ee7bb73b30cdd"></a><!-- doxytag: member="los.h::MOVE_ADD" ref="a6e00a2fb35dc6707708ee7bb73b30cdd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#a6e00a2fb35dc6707708ee7bb73b30cdd">MOVE_ADD</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>implementa il sottostrato LOS del livello ALG </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Massimo Bono </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>6 May 2013 Implementa il sottostrato LOS del livello ALG. il livello LOS viene richiamato dal livello STM in modo "on demand": ciò significa che viene chiamato quando il livello superiore ha bisogno di una nuova soluzione. LOS si occupa di calcolare una nuova soluzione da consegnare al STM. Come può calcolarla? A livello generale LOS genera un intorno della soluzione passata dal STM e, cercando di soddisfare i vincoli contenuti in una tabuPipe, calcola la migliore soluzione possibile diversa da quella iniziale. Come genera l'intorno dipende: fondamentalmente ci sono 3 modi per generare un intorno: <ul>
<li>eseguendo una mossa ADD </li>
<li>eseguendo una mossa SWAP </li>
<li>eseguendo una mossa REMOVEindica l'identificatore assegnato al tipo di mossa <b>ADD</b>. Questo identificartore viene usato da STM per comunicare a LOS quale mossa ha scelto come generatrice di intorno </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="aca2160883183aabb44e9c55536e9c937"></a><!-- doxytag: member="los.h::MOVE_REMOVE" ref="aca2160883183aabb44e9c55536e9c937" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#aca2160883183aabb44e9c55536e9c937">MOVE_REMOVE</a>&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>indica l'identificatore assegnato al tipo di mossa <b>REMOVE</b>. Questo identificartore viene usato da STM per comunicare a LOS quale mossa ha scelto come generatrice di intorno </p>

</div>
</div>
<a class="anchor" id="a46f4bf9b16c21de45b4e49ee0988abe3"></a><!-- doxytag: member="los.h::MOVE_STATUS_FAIL" ref="a46f4bf9b16c21de45b4e49ee0988abe3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#a46f4bf9b16c21de45b4e49ee0988abe3">MOVE_STATUS_FAIL</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>flag di uscita di una mossa LOS per indicare che è fallita e la soluzione non è stata modificata. </p>

</div>
</div>
<a class="anchor" id="ae6e6bd84c4bacfdd4002cbc97a2527cc"></a><!-- doxytag: member="los.h::MOVE_STATUS_IMPROVE" ref="ae6e6bd84c4bacfdd4002cbc97a2527cc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#ae6e6bd84c4bacfdd4002cbc97a2527cc">MOVE_STATUS_IMPROVE</a>&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>flag di uscita di una mossa LOS per indicare che ha avuto successo e la soluzione è migliorata. </p>

</div>
</div>
<a class="anchor" id="ac6f1b10d1aeedd6d056feb10c5569c21"></a><!-- doxytag: member="los.h::MOVE_STATUS_UNCHANGED" ref="ac6f1b10d1aeedd6d056feb10c5569c21" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#ac6f1b10d1aeedd6d056feb10c5569c21">MOVE_STATUS_UNCHANGED</a>&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>flag di uscita di una mossa LOS per indicare che ha avuto successo e la soluzione ha profitto identico. TODO volendo inserirla anche in ADD e SWAP. è più corretta siccome molte operazioni che agiscono su archi dove la raccolta non è in discussione (perchè non profittevoli o non raccoglibili) NON cambiano il profit. </p>

</div>
</div>
<a class="anchor" id="a6d5bd2fe1ebf4b48a88084c50eadfcb0"></a><!-- doxytag: member="los.h::MOVE_STATUS_WORSEN" ref="a6d5bd2fe1ebf4b48a88084c50eadfcb0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#a6d5bd2fe1ebf4b48a88084c50eadfcb0">MOVE_STATUS_WORSEN</a>&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>flag di uscita di una mossa LOS per indicare che ha avuto successo e la soluzione è peggiorata. </p>

</div>
</div>
<a class="anchor" id="a942eeb4ae0805d43bebb8806b712c08a"></a><!-- doxytag: member="los.h::MOVE_SWAP" ref="a942eeb4ae0805d43bebb8806b712c08a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="los_8h.html#a942eeb4ae0805d43bebb8806b712c08a">MOVE_SWAP</a>&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>indica l'identificatore assegnato al tipo di mossa <b>SWAP</b>. Questo identificartore viene usato da STM per comunicare a LOS quale mossa ha scelto come generatrice di intorno </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a3ecf8d3eda795e349fb039e8fcf9a03c"></a><!-- doxytag: member="los.h::BestAddRemoveChoice" ref="a3ecf8d3eda795e349fb039e8fcf9a03c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a>  <a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rappresenta la mossa migliore trovata da ADD fino a questo momento. Add infatti genera un suo particolare intorno e quindi effettua un ciclo per ogni elemento dell'intorno. Quando viene trovata una mossa (temporanea) che migliora la soluzione passata, ADD inserisce i parametri di tale mossa in una struttura di questo tipo. In questo modo quando ADD termina l'esplorazione dell'intorno applica la mossa specificata da questa struttura. </p>

</div>
</div>
<a class="anchor" id="ab58cd3c6e1a39587e826f01c0ffc9c6a"></a><!-- doxytag: member="los.h::EdgePair" ref="ab58cd3c6e1a39587e826f01c0ffc9c6a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structEdgePair.html">EdgePair</a>  <a class="el" href="structEdgePair.html">EdgePair</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Struttura utilizzata per le triangolazioni. </p>

</div>
</div>
<a class="anchor" id="aed8d3fa4c257841c414f74059768204c"></a><!-- doxytag: member="los.h::LOSConfiguration" ref="aed8d3fa4c257841c414f74059768204c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structLOSConfiguration.html">LOSConfiguration</a>  <a class="el" href="structLOSConfiguration.html">LOSConfiguration</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Struttura contenente tutte e sole le configurazioni di cui LOS necessita per girare. </p>

</div>
</div>
<a class="anchor" id="a845149128ecdc5563a7a798c5781dc0c"></a><!-- doxytag: member="los.h::PbestAddRemoveChoice" ref="a845149128ecdc5563a7a798c5781dc0c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structBestAddRemoveChoice.html">BestAddRemoveChoice</a>* <a class="el" href="los_8h.html#a845149128ecdc5563a7a798c5781dc0c">PbestAddRemoveChoice</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>puntatore di servizio. </p>

</div>
</div>
<a class="anchor" id="afb786725c980357f51c0c16ff8414746"></a><!-- doxytag: member="los.h::PedgePair" ref="afb786725c980357f51c0c16ff8414746" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structEdgePair.html">EdgePair</a>* <a class="el" href="los_8h.html#afb786725c980357f51c0c16ff8414746">PedgePair</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Puntatore di servizio. </p>

</div>
</div>
<a class="anchor" id="afecb04de172c596cdc7b8b7a86c687d7"></a><!-- doxytag: member="los.h::pLOSConfiguration" ref="afecb04de172c596cdc7b8b7a86c687d7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structLOSConfiguration.html">LOSConfiguration</a>* <a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a586fd953db07a1a9eb31761c72a87da0"></a><!-- doxytag: member="los.h::getEdgeTriangles" ref="a586fd953db07a1a9eb31761c72a87da0" args="(EdgeID e_ij, int N)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="los_8h.html#afb786725c980357f51c0c16ff8414746">PedgePair</a> <a class="el" href="los_8h.html#a586fd953db07a1a9eb31761c72a87da0">getEdgeTriangles</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structEdgeID.html">EdgeID</a>&#160;</td>
          <td class="paramname"><em>e_ij</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera tutte le (N-2) triangolazioni possibili su un dato edge. L'edge passato puo' anche non essere validato</p>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>gli archi generati sono tutti validati;</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e_ij</td><td>appartenente al grafo </td></tr>
    <tr><td class="paramname">N</td><td>il numero totale di nodi presente nel grafo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>N-2 strutture <a class="el" href="structEdgePair.html">EdgePair</a> (e_il, e_jl) tali che l <img class="formulaInl" alt="$ \in [0,N-1] \setminus \{i, l\} $" src="form_8.png"/>. </dd></dl>

</div>
</div>
<a class="anchor" id="a6d96d2b05304fd01bf15c9adaf94f60f"></a><!-- doxytag: member="los.h::getEdgeTriangulating" ref="a6d96d2b05304fd01bf15c9adaf94f60f" args="(PedgeID pe_il, PedgeID pe_jl)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> <a class="el" href="los_8h.html#a6d96d2b05304fd01bf15c9adaf94f60f">getEdgeTriangulating</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pe_il</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pe_jl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>determina l'arco congiungente due archi consecutivi. Il contr</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pe_il e pe_jl non NULL; </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova istanza (da deallocare se non piu' utile) di <a class="el" href="structEdgeID.html">EdgeID</a>; </li>
<li>la nuova istanza e' validata</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">e_il</td><td>arco interno sx </td></tr>
    <tr><td class="paramname">e_jl</td><td>arco interno dx </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>e_ij il terzo arco connettente i nodi estremi dei due archi interni </dd></dl>

</div>
</div>
<a class="anchor" id="a437a332774430704162eade97987acd0"></a><!-- doxytag: member="los.h::initLOSConfiguration" ref="a437a332774430704162eade97987acd0" args="(PalgConfiguration pALGconfig)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a> <a class="el" href="los_8h.html#a437a332774430704162eade97987acd0">initLOSConfiguration</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ALGConfiguration_8h.html#aeba119601bed3ad672c244e7c8522174">PalgConfiguration</a>&#160;</td>
          <td class="paramname"><em>pALGconfig</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a5d23698e29078da6bf1596b417a1df8c"></a><!-- doxytag: member="los.h::solveLocalSearch" ref="a5d23698e29078da6bf1596b417a1df8c" args="(Pgraph p_graph, Psolution p_solution, int k, PtabooState p_tabooState, int moveType, TabooExpire now, pLOSConfiguration pLOSconfig)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="los_8h.html#a5d23698e29078da6bf1596b417a1df8c">solveLocalSearch</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td>
          <td class="paramname"><em>p_graph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>p_solution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooState_8h.html#aabdb68ff37c6a806d0a2555b0186c9a8">PtabooState</a>&#160;</td>
          <td class="paramname"><em>p_tabooState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>moveType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="tabooExpire_8h.html#a03a425df65af050afbb5cab3c16f4263">TabooExpire</a>&#160;</td>
          <td class="paramname"><em>now</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="los_8h.html#afecb04de172c596cdc7b8b7a86c687d7">pLOSConfiguration</a>&#160;</td>
          <td class="paramname"><em>pLOSconfig</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>calcola la nuova soluzione cercando di soddisfare i vincoli taboo utilizzando come mossa per la generazione dell'intorno quella passata da STM.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pg non NULL </li>
<li>ps non NULL </li>
<li>k compreso tra 0 e K </li>
<li>ptl non NULL </li>
<li>move ha uno dei possiibli valori MOVE_ADD, MOVE_SWAP o MOVE_REMOVE </li>
<li>e' gia' stata richiamata la funzione <a class="el" href="graph_8h.html#a95d25cb8c150c7b95fbefd505bee28c1">initSmartWeights()</a></li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">graph</td><td>indica il grafo su cui cercare di trovare una soluzione </td></tr>
    <tr><td class="paramname">solution</td><td>indica la soluzione corrente </td></tr>
    <tr><td class="paramname">k</td><td>indice del veicolo su cui STM vuole che ci si focalizzi </td></tr>
    <tr><td class="paramname">tabooState</td><td>lo stato delle mosse vietate </td></tr>
    <tr><td class="paramname">moveType</td><td>indica il tipo di ptaboostate-&gt;tls mossa che genera l'intorno </td></tr>
    <tr><td class="paramname">evaluateMode</td><td>flag di selezione tra i criteri di valutazione (sostituisce vecchio sistema di macros) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un flag di stato sull'avvenuta o meno effettuazione di una mossa LOS. Puo' assumere 3 diversi valori: <ul>
<li>MOVE_STATUS_IMPROVE se la ricerca locale ha trovato una nuova soluzione che migliora la soluzione passata; </li>
<li>MOVE_STATUS_WORSEN se la ricerca locale ha trovato una nuova soluzione che peggiora la soluzione passata; </li>
<li>MOVE_STATUS_FAIL se la ricerca locale ha fallito a trovare una nuova soluzione; </li>
</ul>
</dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="los_8h.html">los.h</a>      </li>

    <li class="footer">Generated on Wed Sep 4 2013 06:38:56 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
